<?php
function smarty_function_cache($params, &$smarty){
	$key = $params['key']; unset($params['key']);
	if(empty($key)) return '';
	$data = KCACHE::run()->get($key);
	if($params) foreach($params as $val) $data = $data[$val];
	return $data;
}